#pragma once


#ifndef __SE_EXCEPTION_H__
#define __SE_EXCEPTION_H__


#include <string>
#include <eh.h>
#include <Windows.h>


class SE_Exception { 

public:
    unsigned    m_nSE;
    std::string m_description;

public:
    SE_Exception() {}
    SE_Exception(unsigned nSE): m_nSE(nSE), m_description("") {}
    ~SE_Exception() {}

    unsigned InqSE() { return m_nSE; }
    static void Translator(unsigned n, EXCEPTION_POINTERS *pExp) {

        throw SE_Exception(n);
    }

    void InqDescription(__out std::string &descriptionOut) {

        descriptionOut = m_description;
    }

    static void Initialize() {

        _set_se_translator( SE_Exception::Translator );
    }
};

#endif